#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Author  ：你的烂笔头
@Date    ：2025/6/7 14:00 
'''
import os

from configs.path_conf import path_config
import pytest

if __name__ == '__main__':
    # log_dir = path_config.log_dir
    # for file in os.listdir(log_dir):
    #     if os.path.isfile(os.path.join(log_dir, file)):
    #         os.remove(os.path.join(log_dir, file))

    report_dir = path_config.report_dir
    error_path = os.path.join(report_dir, 'error_img')
    for file in os.listdir(error_path):
        if os.path.isfile(os.path.join(error_path, file)):
            os.remove(os.path.join(error_path, file))
    pytest.main()
    os.system('allure serve ./report/temp')